/**
 * @author lirns
 * @date 2021/11/25 11:35
 */
public class Tree1 implements ICommonTree {
    private String pid;
    private String id;
    private int isLeaf;
    private int levelNum;

    public Tree1() {

    }

    public Tree1(String pid, String id, int isLeaf, int levelNum) {
        this.pid = pid;
        this.id = id;
        this.isLeaf = isLeaf;
        this.levelNum = levelNum;
    }

    @Override
    public void handleCommonTree(CommonTree commonTree) {
        commonTree.setPid(this.pid);
        commonTree.setId(this.id);
        commonTree.setIsLeaf(this.isLeaf);
        commonTree.setLevelNum(this.levelNum);
        commonTree.setNodeType("TREE1");
        commonTree.setData(this);
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(int isLeaf) {
        this.isLeaf = isLeaf;
    }

    public int getLevelNum() {
        return levelNum;
    }

    public void setLevelNum(int levelNum) {
        this.levelNum = levelNum;
    }

    @Override
    public String toString() {
        return "Tree1{" +
                "pid='" + pid + '\'' +
                ", id='" + id + '\'' +
                ", isLeaf=" + isLeaf +
                ", levelNum=" + levelNum +
                '}';
    }
}
